package com.iflytek.day22;

/**
 * 泛型接口
 */
interface Generic03<T> {
  void show(T t);
}

class GenericImpl01<T> implements Generic03<T> {
  @Override
  public void show(T t) {
    System.out.println(t);
  }
}

class GenericImpl02 implements Generic03<Integer> {
  @Override
  public void show(Integer t) {
    System.out.println(t);
  }
}

public class _03_GenericDemo {
  public static void main(String[] args) {
    GenericImpl01<String> g1 = new GenericImpl01<String>();
    g1.show("林青霞");
    GenericImpl01<Integer> g2 = new GenericImpl01<Integer>();
    g2.show(30);

    GenericImpl02 g3 = new GenericImpl02();
    g3.show(10);
  }
}
